#!/usr/bin/ruby
# -*- ruby -*-
#
# http://www.reddit.com/r/dailyprogrammer/comments/1heozl/070113_challenge_131_easy_who_tests_the_tests/

STDIN.readlines.each do |line|
  t, a, b = line.strip.split(' ')

  next if a.nil?

  case t
  when '0'
    a = a.reverse
  when '1'
    a = a.upcase
  else
    raise "Unknown type #{t}"
  end

  puts(a == b ? "Good test data" : "Mismatch! Bad test data")
end
